function screenRecordingOnline(){
    const button = document.getElementById('screenRecordingOnline')
    button.innerHTML = "屏幕浏览器录制";
    document.body.append(button);
    button.addEventListener("click", async () => {
        const stream = await navigator.mediaDevices.getDisplayMedia();
        const recoder = new MediaRecorder(stream);
        recoder.start();
        const [video] = stream.getVideoTracks();
        video.addEventListener("ended", () => {
        recoder.stop();
        });
        recoder.addEventListener("dataavailable", (evt) => {
        const a = document.createElement("a");
        a.href = URL.createObjectURL(evt.data);
        a.download = "video.mp4";
        a.click();
        });
    });
}